#ifndef __MESSAGE_HPP__
#define __MESSAGE_HPP__

#include <thread>
#include "Level.hpp"
#include "Common.hpp"
namespace MyLog
{
    class LogMessage
    {
    public:
        LogMessage(const LogLevel::Level &level, const std::string &file, const std::string &line,
                    const std::string &payload, const std::string &loggername)
        :_currenttime(Common::Date::GetNowTimeStamp()),
         _level(level),
         _tid(std::this_thread::get_id()),
         _filename(file),
         _line(line),
         _payload(payload),
         _loggername(loggername)
        {}
    public:
        time_t _currenttime;//当前时间
        LogLevel::Level _level;//日志等级
        std::thread::id _tid;//线程ID
        std::string _filename;//文件名
        std::string _line;//行号
        std::string _payload;//有效载荷，即消息主体
        std::string _loggername;//日志器名称
    };
}

#endif